unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, DB, DBClient, StdCtrls, ComCtrls;

type
  TForm2 = class(TForm)
    DBGrid1: TDBGrid;
    MonthCalendar1: TMonthCalendar;
    Edit1: TEdit;
    Button1: TButton;
    ClientDataSet1: TClientDataSet;
    DataSource1: TDataSource;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Edit1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
var
data : String;
begin
  data:='db\\'+ DateToStr(MonthCalendar1.Date) +'.xml';
ClientDataSet1.LoadFromFile(data);

ClientDataset1.Filter:='ip='''+Edit1.text+'''';
Clientdataset1.Filtered:=True;
end;

procedure TForm2.FormCreate(Sender: TObject);
var
data : String;
begin
Monthcalendar1.Date:=Date;
try
  data:='db\\'+ DateToStr(date) +'.xml';
ClientDataSet1.LoadFromFile(data);
except
end;
end;

procedure TForm2.Edit1Click(Sender: TObject);
begin
Edit1.Text:='';
end;

end.
